﻿define(function(require) {
  var ko = require("knockout");
  var ctor = function() {
    this.displayName = "Welcome to the Durandal Starter Kit!";
    this.description =
      "Durandal is a cross-device, cross-platform client framework written in JavaScript and designed to make \
      Single Page Applications (SPAs) easy to create and maintain.";
    this.features = [
      "Clean MV* Architecture",
      "JS & HTML Modularity",
      "Simple App Lifecycle",
      "Eventing, Modals, Message Boxes, etc.",
      "Navigation & Screen State Management",
      "Consistent Async Programming w/ Promises",
      "App Bundling and Optimization",
      "Use any Backend Technology",
      "Built on top of jQuery, Knockout & RequireJS",
      "Integrates with other libraries such as SammyJS & Bootstrap",
      "Make jQuery & Bootstrap widgets templatable and bindable\
       (or build your own widgets)."
    ];

    this.currentDate = ko.observable("");
  };
  ctor.prototype.attached = function() {
    setInterval(() => {
      this.currentDate(new Date().toLocaleString());
    }, 1000);
  };
  //Note: This module exports a function. That means that you, the developer, can create multiple instances.
  //This pattern is also recognized by Durandal so that it can create instances on demand.
  //If you wish to create a singleton, you should export an object instead of a function.
  //See the "flickr" module for an example of object export.

  return ctor;
});
